#ifndef EVENT_INTERFACE_H
#define EVENT_INTERFACE_H

#include <typeinfo.h>
#include <iosfwd>

enum EActorType
{
    e_RoleMgr,
    e_Log,
    e_Role,
};

class CSimpleActor;
typedef shared_ptr<CSimpleActor> TActor;

class IEvent
{
public:
    IEvent (TActor pSender)
    {
        m_pSender = pSender;
    }

    virtual ~IEvent() {}

    virtual const char * GetName()
    {
        return typeid(*this).name();
    }    

    // serialize 
    virtual void Serialize(std::ostream & stream) = 0;

    virtual EActorType GetExecutorType() = 0; 

    inline const TActor GetSender() const {return m_pSender;}
private:
    TActor m_pSender;
};

typedef shared_ptr<IEvent> TEvent ;

#endif
